"""
@author: yinjx
@file: register.py
@time: 2023/8/3 19:41
"""
from flask import Blueprint, request
# from router import user_dict
from config.settings import user_dict

# register_bp = Blueprint("register_bp", __name__, url_prefix="/v1")
#
# @register_bp.route("/register1")
# def register():
#     username = request.json.get("username")
#     passwd = request.json.get("passwd")
#     re_pass = request.json.get("re_passwd")
#     if not (username and passwd and re_pass):
#         return "参数传递不完整"
#     if passwd != re_pass:
#         return "注册密码不一致！"
#     if username in user_dict:
#         return "用户已注册"
#     user_dict[username] = passwd
#     print(f"user_dict is {user_dict}")
#     return "register success!"